<?php
require_once 'BaseController.php';

/**
 * 情報誌No.検索クラス<br />
 *
 * @package apamanshop
 * @author　
 * @copyright　
 */
class Search_JyohoshisearchController extends Search_BaseController
{
	public function indexAction()
	{

        // アクション名
    	$this->_data['form_act'] = "jyohoshisearch";

        // モデルの呼び出し
        //情報誌No.検索モデル
		$this->_model_jyohoshisearch = new Search_Model_Seljyohoshisearch();
		
		$this->_data['rstobi_data'] = $this->setRstobiData(Apm_Config_Search::SRHKBN_JYOHOSHINO);

		$this->_data['search_no'] = $this->_params['SchNo'];
        $this->_data['seljyohoshi'] = array();
		$this->_data['seljyohoshi'] = $this->_model_jyohoshisearch->getJyohoshiData($this->_params);

		//検索結果が存在しないとき
		if(!$this->_data['seljyohoshi']) {
			$this->_data['main_block'] = $this->_jyohoshino_nodata_helper->getBlock($this->_data);
		}else{
		//検索結果が存在するときは、詳細画面にリダイレクトする。
			Apm_Util::redirect(Apm_Config_Search::URL_RSTOBI, $this->_data);
		}

        // 表示
       	$this->display();

	}
}
?>